package com.zryc.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@TableName("t_product")
@ApiModel("商品对象")
public class Product {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(name = "pid", value = "商品ID",allowableValues = "1,2,3,4",required = false,allowEmptyValue = true)
    private Integer pid;//主键
    @ApiModelProperty(name = "pname",value = "商品名称",required = true,allowEmptyValue = false)
    private String pname;//商品名称
    @ApiModelProperty(name = "pprice",value = "商品价格",required = true,allowEmptyValue = false)
    private Double pprice;//商品价格
    @ApiModelProperty(name = "stock",value = "商品库存",required = true,allowEmptyValue = false)
    private Integer stock;//库存
}